<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  
  <script>

    /*
      1.首先 会执行var count = 0；
      2.根据条件执行代码
        * count<3
        * alert(count)
        * count++
    */
    for(var count = 0;count < 3;count ++){
      alert(count)
    }
  </script>
</body>
</html>